import React from "react"

import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
import { useLocale, useOptions } from "@/hooks"

const VirtualCoinKindSelect = ({ rules, disable, labelProps, selectorProps, name }: any) => {
	const { formatMessage } = useLocale()

	const options = useOptions({
		modal: "virtualType",
		func: formatMessage
	})

	return (
		<SFormItem
			name={name || "virtualCoinKind"}
			rules={rules}
			{...labelProps}
			label={formatMessage({ id: "member.virtual_type" })}
		>
			<StyleSelect
				placeholder={formatMessage({ id: "common.select_all" })}
				allowClear
				options={options}
				disable={disable}
				{...selectorProps}
			/>
		</SFormItem>
	)
}

export default VirtualCoinKindSelect
